An image processing apparatus for providing a high-quality print image generally executes the following processing. First, a 24-bit RGB multilevel bitmap is rendered on a multilevel bitmap area in accordance with a rendering command. When processing of all rendering commands is ended, color processing (color correction, color conversion, 2n-ary conversion) is executed for the entire multilevel bitmap area. FIG. 12 shows this processing. As shown in FIG. 12, rendering objects with attributes such as “text”, “graphics”, and “image” are rendered on the multilevel bitmap area. The same color processing is executed for the entire multilevel bitmap area independently of the attributes, thereby obtaining a bitmap dependent on a device such as a printer to output the image. That is, different color processing operations cannot be executed for the rendered objects.
As described above, a rendered multilevel bitmap has no additional information representing the attribute of each pixel. Since the type (text, graphics, or image) of rendered object to which an arbitrary pixel belongs or whether the pixel belongs to the edge portion or central portion of the object cannot be determined, optimum color processing cannot be executed for each pixel.
Various kinds of methods of optimally changing color processing for each pixel have been proposed presently. As a general method, additional information is added to all pixels.
For example, one byte is ensured for every 24-bit RGB data, and processing is executed by RGBα 32 bits per pixel. Alternatively, as shown in FIG. 13, an additional information memory is ensured in another area, and additional information is set for all pixels. In the method shown in FIG. 13, every time a pixel in the multilevel bitmap area is updated, additional information corresponding to the pixel is also updated. After all rendering commands are rendered on the multilevel bitmap area, a bitmap is generated by executing color processing optimum for each attribute by referring to the additional information of each pixel (e.g., Japanese Patent Laid-Open No. 2001-228990).
In the conventional color processing scheme for each pixel, no problem arises as long as all rendering objects are overwritten. However, when a rendering object for which a logic operation is designated is processed, the additional information cannot be stored correctly. A detailed example will be described below with reference to FIG. 14.
Referring to FIG. 14, rendering object 1 having image attribute and rendering object having graphics attribute are processed. A logic operation “render only when no background is present” is designated for rendering object 2. In this case, additional information 1 corresponding to rendering object 1 is stored in an additional information storage area 141. Then, additional information 2 corresponding to rendering object 2 is stored in the additional information storage area 141. At this time, additional information 2 is overwritten on already stored additional information 1 in some pixels.
Ideally, when the logic operation designated for rendering object 2 is executed, rendering object 1 should wholly be rendered as a color-processed bitmap 142 while rendering object 2 overlapping it should not be rendered. However, as indicated by the additional information storage area 141 in FIG. 14, when additional information is stored without considering the logic operation, some pixels are determined as not “image” but “graphics”. Hence, no optimum color processing can be executed, and no optimum rendering is executed, either.